package com.wlyuan.open.scanner.utils.enums.quotation;

import com.wlyuan.core.marker.NamedValue;
import com.wlyuan.core.marker.NamedValueMap;
import lombok.AccessLevel;
import lombok.Getter;
import lombok.RequiredArgsConstructor;

import java.util.Map;

/**
 * @author lijing
 * @description 合约类型
 */
@RequiredArgsConstructor(access = AccessLevel.PRIVATE)
@Getter
public enum TemplateFromTypeEnum implements NamedValue<Integer> {

    /**
     * 承运方报价
     */
    SUPPLIER(2, TemplateRelationTypeEnum.CARRIER.getValue(), "承运方报价"),
    /**
     * 客户报价
     */
    CUSTOMER(1, TemplateRelationTypeEnum.CUSTOMER.getValue(), "客户报价");

    private final Integer value;
    private final Integer newValue;
    private final String name;


    private static final Map<Integer, TemplateFromTypeEnum> MAP = new NamedValueMap<>(TemplateFromTypeEnum.class);

    public static TemplateFromTypeEnum fromValue(Integer value) {
        return MAP.get(value);
    }


}
